package day03;

public class ScoreDemo {
    public static void main(String[] args) {
        sw(98);

        test(89);
    }
    public static void sw(int score){
        int n = score/10;
        switch (n){
            case 9:
                System.out.println("太优秀了");
            case 8:
                System.out.println("很好");
            case 7:
            case 6:
                System.out.println("中等");
                break;
            default:
                System.out.println("分数异常！");
        }
    }

    public static void test(int score){
        if(score < 0 || score > 100){
            System.out.println("分数异常");
            return;
        }
        if(score>=90){
            System.out.println("优秀");
        }else if(score>=80){
            System.out.println("良好");
        }else{
            System.out.println("中等");
        }
    }
    public static int getMaxDays(int year,int month){
        int max = -1;
        switch(month){
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                max = 31;
            case 2:
                max = IFDemo.isLeapYear(year)?29:28;
                break;
            default:
                max = 30;
        }
        return max;
    }
}
